#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:修改外层函数.py
# author: 马国鑫
# datetime:2022/3/18 20:20
# software: PyCharm

"""
this is function  description 
"""


# import module your need

def func_outer(data):
    num = 100
    print('外层函数变量', num)

    def func_inner():
        nonlocal num
        # 修改外层函数变量
        num = 1000
        print('内层函数num:', num)

    func_inner()
    print('外层函数修改后', num)
    return func_inner


func = func_outer(10)
func()
